package com.example.springboottest.example.jaxws.hello.server;

import com.example.springboottest.example.jaxws.hello.HelloWorld;
import com.example.springboottest.example.jaxws.hello.HelloWorldImpl;

import javax.xml.ws.Endpoint;

public class Server {
    public Server() {
        System.out.println("Starting Server");
        HelloWorld helloWorld = new HelloWorldImpl();
        String address = "http://localhost:9000/HelloWorld";
        Endpoint.publish(address, helloWorld);
    }

    public static void main(String[] args) {
        new Server();
        try {
            Thread.sleep(500 * 60 * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Server Exiting");
        System.exit(0);
    }
}